﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<CourseSystem.Core.Entities.ExamStatusInfo>>" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<table width="800" height="10" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td>
        </td>
    </tr>
</table>
<%
    var count = Model.Count;
    for (int i = 0; i < Model.Count; i++)
    {
        var startI = i;
%>
<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="280">
            <table width="270" height="150" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
                <tr>
                    <td bgcolor="<%=ExamStatusHelper.GetColorByItem(Model[i]) %>">
                        <table width="270" height="150" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td height="147">
                                    <table width="270" height="150" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="18">
                                            </td>
                                            <td width="145">
                                                <table width="145" border="0" cellspacing="0" cellpadding="0">
                                                    <tr class="stylenew4">
                                                        <td width="50" height="25" align="right">
                                                            <div align="right">
                                                                考生：</div>
                                                        </td>
                                                        <td>
                                                            <%=Model[i].StudentInfo.StuName %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                                学号：</div>
                                                        </td>
                                                        <td>
                                                            <%=Model[i].StudentInfo.Uid %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                                状态：</div>
                                                        </td>
                                                        <td>
                                                            <%= ExamStatusHelper.GetNameByStatus(Model[i].Status) %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <% if (Model[i].Status != 1)
                                                               {  %><%=Html.ActionButton("警告","ExamWarn",new {Model[i].Id}) %><%} %>
                                                               <% i++; %>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="107" align="center" valign="middle">
                                                <img src="<%=ResolveUrl("~/Content/Admin/images/c_05.gif")%>" width="93" height="123">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
        <td width="280">
            <% if (i < count)
               {%>
            <table width="270" height="150" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
                <tr>
                    <td bgcolor="<%= ExamStatusHelper.GetColorByItem(Model[i]) %>">
                        <table width="270" height="150" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td height="147">
                                    <table width="270" height="150" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="18">
                                            </td>
                                            <td width="145">
                                                <table width="145" border="0" cellspacing="0" cellpadding="0">
                                                    <tr class="stylenew4">
                                                        <td width="50" height="25" align="right">
                                                            <div align="right">
                                                                考生：</div>
                                                        </td>
                                                        <td>
                                                            <%= Model[i].StudentInfo.StuName %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                                学号：</div>
                                                        </td>
                                                        <td>
                                                            <%= Model[i].StudentInfo.Uid %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                                状态：</div>
                                                        </td>
                                                        <td>
                                                            <%= ExamStatusHelper.GetNameByStatus(Model[i].Status) %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                            </div>
                                                        </td>
                                                        <td>
                                                           <% if (Model[i].Status != 1)
                                                               {  %><%=Html.ActionButton("警告","ExamWarn",new {Model[i].Id}) %><%} %> <% i++; %>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="107" align="center" valign="middle">
                                                <img src="<%= ResolveUrl("~/Content/Admin/images/c_05.gif") %>" width="93" height="123">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <% } %>
        </td>
        <td width="280">
            <% if (i < count)
               {%>
            <table width="270" height="150" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
                <tr>
                    <td bgcolor="<%= ExamStatusHelper.GetColorByItem(Model[i]) %>">
                        <table width="270" height="150" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td height="147">
                                    <table width="270" height="150" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="18">
                                            </td>
                                            <td width="145">
                                                <table width="145" border="0" cellspacing="0" cellpadding="0">
                                                    <tr class="stylenew4">
                                                        <td width="50" height="25" align="right">
                                                            <div align="right">
                                                                考生：</div>
                                                        </td>
                                                        <td>
                                                            <%= Model[i].StudentInfo.StuName %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                                学号：</div>
                                                        </td>
                                                        <td>
                                                            <%= Model[i].StudentInfo.Uid %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                                状态：</div>
                                                        </td>
                                                        <td>
                                                            <%= ExamStatusHelper.GetNameByStatus(Model[i].Status) %>
                                                        </td>
                                                    </tr>
                                                    <tr class="stylenew4">
                                                        <td height="25">
                                                            <div align="right">
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <% if (Model[i].Status != 1)
                                                               {  %><%=Html.ActionButton("警告","ExamWarn",new {Model[i].Id}) %><%} %> <% i++; %>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="107" align="center" valign="middle">
                                                <img src="<%= ResolveUrl("~/Content/Admin/images/c_05.gif") %>" width="93" height="123">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <% } %>
        </td>
    </tr>
</table>
<%} %>
<table width="98%" height="7" border="0" align="center" cellpadding="0" cellspacing="0"
    bordercolor="#FFFFFF">
    <tr>
        <td class="gray12">
            &nbsp;
        </td>
        <td align="right" class="gray12">
            <%=Html.AjaxPager(Model, new PagerOptions() { ContainerTagName = "span", CssClass = "mvcPager", PageIndexParameterName = "pid", ShowMorePagerItems = false, AlwaysShowFirstLastPageNumber = true, }, new AjaxOptions() { UpdateTargetId = "listDiv" })%>
            共<%=Model.TotalItemCount %>条记录，页<%=Model.CurrentPageIndex %>/<%=Model.TotalPageCount %>
        </td>
    </tr>
</table>
